package io.github.burukeyou.dataframe.iframe.item;

import java.util.Objects;

/**
 * DataFrame （4 x 4 矩阵）
 * @param <T1>
 * @param <T2>
 * @param <T3>
 * @param <T4>
 *
 * @author caizhihao
 */
public class FI4<T1, T2, T3, T4> implements FItem {
    private T1 c1;
    private T2 c2;
    private T3 c3;
    private T4 c4;

    public FI4() {
    }

    public FI4(T1 c1, T2 c2, T3 c3, T4 c4) {
        this.c1 = c1;
        this.c2 = c2;
        this.c3 = c3;
        this.c4 = c4;
    }

    public T1 C1() {
        return c1;
    }

    public T2 C2() {
        return c2;
    }

    public T3 C3() {
        return c3;
    }

    public T4 C4() {
        return c4;
    }

    public T1 getC1() {
        return c1;
    }

    public void setC1(T1 c1) {
        this.c1 = c1;
    }

    public T2 getC2() {
        return c2;
    }

    public void setC2(T2 c2) {
        this.c2 = c2;
    }

    public T3 getC3() {
        return c3;
    }

    public void setC3(T3 c3) {
        this.c3 = c3;
    }

    public T4 getC4() {
        return c4;
    }

    public void setC4(T4 c4) {
        this.c4 = c4;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;

        FI4<?, ?, ?, ?> fi4 = (FI4<?, ?, ?, ?>) o;
        return Objects.equals(c1, fi4.c1) && Objects.equals(c2, fi4.c2) && Objects.equals(c3, fi4.c3) && Objects.equals(c4, fi4.c4);
    }

    @Override
    public int hashCode() {
        int result = Objects.hashCode(c1);
        result = 31 * result + Objects.hashCode(c2);
        result = 31 * result + Objects.hashCode(c3);
        result = 31 * result + Objects.hashCode(c4);
        return result;
    }
}
